var mongoose      = require('mongoose'),
    Schema = mongoose.Schema;

var pointhistory = new Schema({
  triggered_by: {type: String, index: true, default: ''},
  triggered_by_name: {type: String, default: ''},
  action_type: {type: String, default: ''},
  awarded_to: {type: String, index: true, default: ''},
  awarded_to_name: {type: String, default: ''},
  create_time:  {type: Number, default: 0},
  point: {type: Number, default: 0},
  exchange: {
    exchange_type: {type: String, default: ''},
    amount: {type: Number, default: 0}
  }
});

module.exports = mongoose.model('pointhistory', pointhistory);